<?php
class inquiry{

	function selectInquiry()
	{
		global $con;
		$sql="select * from tbl_inquiry";
		$res = mysqli_query($con,$sql);
		return $res;
	}/// EOF
	
	function addInquiry($inq_name,$inq_org,$inq_email,$inq_address,$inq_phone,$inq_apply,$inq_msg,$date)
	{
		global $con;
		$sql="INSERT INTO tbl_inquiry SET 
			inquiry_name='$inq_name',
			inquiry_org='$inq_org', 
			inquiry_email='$inq_email', 
			inquiry_address='$inq_address', 
			inquiry_phn='$inq_phone',
			inquiry_apply='$inq_apply',
			inquiry_msg='$inq_msg',
			inquiry_added_date='$date'";
		mysqli_query($con,$sql);
	}/// EOF
	function deleteInquiry($id)
	{
		global $con;
		$sql="DELETE FROM tbl_inquiry WHERE inquiry_id='$id' ";
		mysqli_query($con,$sql);
		}
	function editInquiry($catId,$catName,$catDetails,$date)
	{
		global $con;
		$sql="UPDATE tbl_inquiry SET cat_name='$catName',cat_details='$catDetails', cat_added_date='$date' WHERE cat_id='$catId'";
		mysqli_query($con,$sql);
	}	
	/*function getCategoryById($id)
	{
		global $con;
		$sql="SELECT *FROM tbl_category WHERE cat_id='$id'";
		$res=mysqli_query($con,$sql);
		return $res;	
	}*/
	
}//EOC


$objInquiry=new inquiry();
?>
